# Contributor: guddaff <guddaff@protonmail.com>
# Maintainer: guddaff <guddaff@protonmail.com>
pkgname=hex
pkgver=0.5.0
pkgrel=0
pkgdesc="futuristic take on hexdump"
url="https://github.com/sitkevij/hex"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le" # limited by rust/cargo
license="MIT"
makedepends="cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/sitkevij/hex/archive/refs/tags/v$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --release --locked
}

package() {
	cargo auditable install --locked --path . --root="$pkgdir/usr"
	rm "$pkgdir"/usr/.crates*
}

sha512sums="
f69f55a911a7417ac80b7e6a3d53efba5af9f086045547a7f8308692624a4757b9171f7cd8b815b15fe4461c9318df17185e0d423b9b8dde571088947fa8f8fd  hex-0.5.0.tar.gz
"
